package com.lanxiao.cloud.common.web.bus.event;

import com.lanxiao.cloud.common.core.bus.event.DomainEvent;
import com.lanxiao.cloud.common.core.enums.OperationType;
import com.lanxiao.cloud.common.core.enums.StateEnum;
import java.util.Date;

/**
 * @author ：qiaoliang
 * @date ：2021-10-15
 */
public class LogEvent<I> extends DomainEvent {

  /** 服务名称 **/
  private String service;
  /** 服务内容ID **/
  private Object serviceId;
  /** 服务类型 **/
  private String serviceType;

  /** url **/
  private String url;
  /** 类名 **/
  private String className;
  /** 方法名 **/
  private String methodName;
  /** 方法描述 **/
  private String methodDescription;
  /** 请求参数 **/
  private Object requestParams;
  /** 返回参数 **/
  private Object responseParams;

  /** 浏览器 **/
  private String browser;
  /** 操作系统 **/
  private String operatingSystem;
  /** 内容 **/
  private Object content;
  /** 类型 **/
  private OperationType type;
  /** ip地址 **/
  private String ip;
  /** ip地址 **/
  private String region;
  /** 创建者 **/
  private I createBy;
  /** 成功失败 **/
  private StateEnum state = StateEnum.NORMAL;
  /** 失败描述 **/
  private String errorMessage;

  /** 耗时 **/
  private Long timeConsuming;

  public LogEvent() {
  }

  public LogEvent(String service) {
    this.service = service;
  }

  public String getService() {
    return service;
  }

  public void setService(String service) {
    this.service = service;
  }

  public Object getServiceId() {
    return serviceId;
  }

  public void setServiceId(Object serviceId) {
    this.serviceId = serviceId;
  }

  public String getServiceType() {
    return serviceType;
  }

  public void setServiceType(String serviceType) {
    this.serviceType = serviceType;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public String getClassName() {
    return className;
  }

  public void setClassName(String className) {
    this.className = className;
  }

  public String getMethodName() {
    return methodName;
  }

  public void setMethodName(String methodName) {
    this.methodName = methodName;
  }

  public String getMethodDescription() {
    return methodDescription;
  }

  public void setMethodDescription(String methodDescription) {
    this.methodDescription = methodDescription;
  }

  public Object getRequestParams() {
    return requestParams;
  }

  public void setRequestParams(Object requestParams) {
    this.requestParams = requestParams;
  }

  public Object getResponseParams() {
    return responseParams;
  }

  public void setResponseParams(Object responseParams) {
    this.responseParams = responseParams;
  }

  public String getBrowser() {
    return browser;
  }

  public void setBrowser(String browser) {
    this.browser = browser;
  }

  public String getOperatingSystem() {
    return operatingSystem;
  }

  public void setOperatingSystem(String operatingSystem) {
    this.operatingSystem = operatingSystem;
  }

  public Object getContent() {
    return content;
  }

  public void setContent(Object content) {
    this.content = content;
  }

  public OperationType getType() {
    return type;
  }

  public void setType(OperationType type) {
    this.type = type;
  }

  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public String getRegion() {
    return region;
  }

  public void setRegion(String region) {
    this.region = region;
  }

  public I getCreateBy() {
    return createBy;
  }

  public void setCreateBy(I createBy) {
    this.createBy = createBy;
  }

  public StateEnum getState() {
    return state;
  }

  public void setState(StateEnum state) {
    this.state = state;
  }

  public Long getTimeConsuming() {
    return timeConsuming;
  }

  public String getErrorMessage() {
    return errorMessage;
  }

  public void setErrorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
  }

  public void setTimeConsuming(Long timeConsuming) {
    this.timeConsuming = timeConsuming;
  }
}
